Skip to content

fix(ios)!: inputNode race condition - #1260

Merged
closetcaiman merged 3 commits into
mainfrom
fix/handle-configuration-change-race-condition
Sep 4, 2026
Merged

fix(ios)!: inputNode race condition#1260
closetcaiman merged 3 commits into
mainfrom
fix/handle-configuration-change-race-condition

Conversation

@closetcaiman

@closetcaiman closetcaiman commented Sep 1, 2026

Copy link
Copy Markdown
Member

⚠️ Breaking changes ⚠️

  • N/A

Introduced changes

  • added a mutex on getLiveInputNode path so that it does not race with AudioRecorder::start which caused use-after-free and a hard crash.
  • modified the mutex do be recursive, so that it does not deadlock when re-locking from notifyConfiguration path.

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added/Conducted relevant tests
  • Performed self-review of the code
  • Updated Web Audio API coverage
  • Added support for web
  • Updated old arch android spec file

@closetcaiman closetcaiman added fix Code changes specifically addressing and resolving a bug ios Native iOS implementation, CoreAudio/AVFoundation bindings, or iOS-specific issues pkg:audio-api Core React Native audio control system compliant with the W3C Web Audio API spec labels Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

WPT non-regression comparison

PASS — no regressions · 0 improved section(s) · overall 2632 → 2632 (0)

Unchanged sections (28)
Spec section Base pass Head pass Delta
Processing model 0 0 0
Other 52 52 0
AnalyserNode 138 138 0
AudioBuffer 140 140 0
AudioBufferSourceNode 208 208 0
AudioContext 58 58 0
AudioNode 261 261 0
AudioParam 599 599 0
BiquadFilterNode 275 275 0
ChannelMergerNode 30 30 0
ChannelSplitterNode 7 7 0
ConstantSourceNode 59 59 0
ConvolverNode 170 170 0
DelayNode 104 104 0
DestinationNode 0 0 0
DynamicsCompressorNode 4 4 0
GainNode 15 15 0
IIRFilterNode 87 87 0
MediaElementAudioSourceNode 0 0 0
MediaStreamAudioDestinationNode 1 1 0
MediaStreamAudioSourceNode 0 0 0
OfflineAudioContext 35 35 0
OscillatorNode 104 104 0
PannerNode 75 75 0
PeriodicWave 33 33 0
ScriptProcessorNode 0 0 0
StereoPannerNode 102 102 0
WaveShaperNode 75 75 0

Baseline: 1b78480fd3c4a1e481bfa3158f4eaa83eb447c1d · Candidate: 5b42b91813d4cc6fe46947ef12e1fc8e481e77db

Workflow run · this comment is updated on every push.

Comment thread packages/react-native-audio-api/ios/audioapi/ios/system/AudioEngine.mm Outdated

@SomePersonFromMars SomePersonFromMars left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!

@closetcaiman
closetcaiman force-pushed the fix/handle-configuration-change-race-condition branch from 6966654 to 5b42b91 Compare September 4, 2026 11:21
@closetcaiman
closetcaiman merged commit 3d7c2a0 into main Sep 4, 2026
12 checks passed
@closetcaiman
closetcaiman deleted the fix/handle-configuration-change-race-condition branch September 4, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Code changes specifically addressing and resolving a bug ios Native iOS implementation, CoreAudio/AVFoundation bindings, or iOS-specific issues pkg:audio-api Core React Native audio control system compliant with the W3C Web Audio API spec

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants